<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>面包屑导航</title>
    <style>
      .breadcrumb {
        padding: 0 0.5rem;
      }

      .breadcrumb ul {
        display: flex;
        flex-wrap: wrap;
        list-style: none;
        margin: 0;
        padding: 0;
      }

      /* 空格隔开的叫做后代选择器 */
      .breadcrumb li {
        display: inline-block;
      }
      .breadcrumb a {
        /* 去掉a标签的默认样式 */
        text-decoration: none;
      }
      .breadcrumb li:not(:last-child)::after {
        display: inline-block;
        margin: 0 0.25rem;
        content: "->";
      }

      /* 这样子也能达到上面的效果::before 在元素内容之前加 */
      /* .breadcrumb li:not(:first-child)::before {
        content: "→";
      } */
    </style>
  </head>
  <body>
    <nav aria-label="Breadcrumb" class="breadcrumb">
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Category</a></li>
        <li><a href="#">Sub Category</a></li>
        <li><a href="#">Type</a></li>
        <li><span aria-current="page">Product</span></li>
      </ul>
    </nav>
  </body>
</html>
